﻿@model IEnumerable<Qu.ComputingContest.Model.SchoolInfo>

@{
    Layout = null;
}

<!DOCTYPE html>
<html>
<head>
    <style type="text/css">
        #schools
        {
        font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
        width:100%;
        border-collapse:collapse;
        }
        #schools td, #schools th 
        {
        font-size:1em;
        border:1px solid #98bf21;
        padding:3px 7px 2px 7px;
        }
        #schools th 
        {
        font-size:1.1em;
        text-align:left;
        padding-top:5px;
        padding-bottom:4px;
        background-color:#A7C942;
        color:#ffffff;
        }
        #schools tr.alt td 
        {
        color:#000000;
        background-color:#EAF2D3;
        }
    </style>
    <title>Registered Schools</title>
</head>
<body>
    <h1>Registered Schools</h1>
    <table id="schools">
        <tr>
            <th>
                Name
            </th>
            <th>
                Teams
            </th>
            <th>
                Gender
            </th>
            <th>
                Type
            </th>
            <th>
                Email
            </th>
            <th>
                Phone1
            </th>
            <th>
                Phone2
            </th>
            <th>
                Website
            </th>
        </tr>
    
    @foreach (var item in Model) {
        <tr>
@*            <td>
                @Html.ActionLink("Edit", "Edit", new { id=item.SchoolID }) |
                @Html.ActionLink("Details", "Details", new { id=item.SchoolID }) |
                @Html.ActionLink("Delete", "Delete", new { id=item.SchoolID })
            </td>*@
            <td>
                @item.Name
            </td>
            <td>
                @item.Teams
            </td>
            <td>
                @item.Gender
            </td>
            <td>
                @item.Type
            </td>
            <td>
                @item.Email
            </td>
            <td>
                @item.Phone1
            </td>
            <td>
                @item.Phone2
            </td>
            <td>
                @item.Website
            </td>
        </tr>
    }
    
    </table>

    <br />
    <div>Number of registered schools: @Model.Count() </div>
    <div>Number of registered teams: @Model.Sum(s => s.Teams) </div>
</body>
</html>

